#ifndef __PMSM_H
#define __PMSM_H

#include "foc.h"
#include "pid.h"


#define POLE_PAIR               5
#define ENCODER_PER_CIRCLE      16384  //4096*4 pulse every circle

#define MOTOR_DRV_UDC   24.0f    //24V voltage 
#define MOTOR_TS        100.0f   //100uS 
#define MOTOR_MAX       80.0f
#define ADC_TS          5.0f     //ADC DELAY FOR CURRENT SAMPLE
#define PWM_CENT_VALUE  8400     //
#define ENCODER_COUNT   1000*4   //four time of earch circle 
#define ECODER_RADIAN_COEF   0.01744f    //2 * pi/360 = 2*3.14/360    



void motor_param_init(p_motor motor);
void motorTest_encoderCloseLoop(p_motor motor);
void foc_printf(p_motor motor);

#endif
